<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*,java.util.*,vo.*,utils.*,impl.*" errorPage="" %>
<%

String ids=(String)request.getAttribute("ids");
String names=(String)request.getAttribute("names");
String html=(String)request.getAttribute("html");
String title="";
if(html.length()>0)
	title="请选择下一步操作人";
else 
	title="下一步操作人";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择下一步操作人员</title>
<LINK rel="stylesheet" href="/css/arg.css" type="text/css">
<SCRIPT language="javascript" src="/script/tools_1.js"></SCRIPT>
<script>
//var par=parent;
var par=opener;
function selectEnd(){
	if(<%=html.length()%>>0){
		if(document.form1.selectPerson.value==""){
			alert("请选择");
			return;
		}
		var ids="";
		var i;
		for(i=0;i<document.form1.selectPerson.options.length;i++)
			if(document.form1.selectPerson.options[i].selected){
				ids+=","+document.form1.selectPerson.options[i].value;
			}
		par.document.form1.nextPerson.value=ids.substring(1);
	}else{
		par.document.form1.nextPerson.value="<%=ids%>";
	}	
	par.document.form1.submit();
	window.close();
}
</script>
<style>
select{
	height:200px;
	width:200px;
}
</style>
</head>

<body class="AAAA">
<form name="form1" onSubmit="return false">
<script>createTitle("<%=title%>");</script>
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="border">
  <tr>
    <td class="table_content">
	<%
		if(html.length()>0){
			out.println(html);			
		}
		else if(names.length()>0){
			out.println("&nbsp;&nbsp;"+names);
		}
			
	%>
	</td>
  </tr>
  <tr>
  	<td class="table_content" align="center">
		<input type="button" class="button" onClick="selectEnd()" value="确定" />
	</td>
  </tr>
</table>
</form>
<script>
<%
	if(html.length()<1&&ids.length()<1){
		out.println("par.document.form1.submit();");
		out.println("window.close();");
	}
%>
</script>
</body>
</html>
